fix bug that causes 'Email address already in use' error