Bug fixed with update user function