Fixed bug in getClasses()