fixed error where the registration wouldnt close