Fix bug when changing user