fix error in type of class checking