Program changes and midi cc's

I’m sure I’m missing something very simple here.im using a line 6 pod 500 for my guitar sounds and I’m able to turn effects on and off via midi cc’s.
The issue I’m encountering is this, if I restart the midi file I’m playing before it ends the patch on the pod 500 sometimes does not return to it’s original state. I thought maybe sending a cc 121 “reset all controller” might do the trick but it doesnt seem to.

I’m not sure if its quite the same thing but I use Reaktors TRK which uses MIDI Notes to trigger various sequences which I use from a MIDI file. If the MIDI file is started midway through the track it will only fire a MIDI CC when the MIDI file hits that information (it won’t look back to revert to the last message) so, if there is always a patch from the POD you want if starting the track (even midway through) you could use a ‘Binding’ so say when transport is PLAY fire a single MIDI CC nnn to the MIDI port for the POD… I may not be understanding what you are describing but that’s the issue with MIDI files is it will only send the message when the timeline reaches that point (if that makes sense)…

That might be helpful, the patch does load as the file gets created in cakewalk with the patch as a track setting. However the patch for some reason doesn’t return to it’s original state. eg. Distortion is off when it should be on or vice-versa.