Fix bug when updating password