fixed error when no email set to user