Made bug fixes to Register functionality