various fixes for update user function