Fixed errors in register