Fixed double errors in registration