add some fixes to registration