It seems like you also need to carry snack food with you that has protein in it. A cup of shelled walnuts, or if you have access to it, cheese or yogurt, is a better refuel snack than a candy bar. Fueling with something so full of carbs, after the sugar high you crash, as you've demonstrated.