Fixed registration email not being sent error