Fixed an error with registering