fixed bug in new registration