fixed the registration validation