fixed the registration bug!