Fixed error checking for getCrossSectionByGroup