fix wrong id
make find_main_user_line handle correctly when user_id is null