Fix bugs in curent_user assignment