Fixed an issue with class registration where the specified name was not used.