Fixed Trigger requirement bug, optimized hisogram collection sorting