Fixed errors in register attempt 4