fixed more registration bugs