49ers fall short in final minute, lose to Rams 13-10