Fixed crash when no classes provided