bug fixes to registration