fix bugs in the cross section calculator