fix bugs in current_user assignment