fix issue that the user id is not assigned.