Discovered classes are now sorted - fixing #1180