Bug fix for resetting password