Effect of sawtooth oscillations on energetic ions