bug fixes in registration