fixing registration validation