fixed the user_id update and user relationship