Fixes bug when updating password