Fixed errors on registration