fixed the condition to accommodate for the bool value of regularRegistration variable