Fixed issue with email generation after user registration.