Fixed up the class registration method