fixed class_of()