Bug fix for queries where the selected class is not the first one in the list
Bug fix for queries where the selected class is not the first one in the list

ucbpi/itop,ucbpi/itop,ucbpi/itop,ucbpi/itop,ucbpi/itop