fix the registration process