Fixed error in auto-email registration