Hi!!
I found your posting and I think may have an elegant solution for you. I've been trying to do pretty much the same thing you have (change patches on two keyboard).
Please read the following thread on Midiworld forum
http://www.midiworld.com/forum/viewtopic.php?t=698
It describes the entire process I've gone through.
One item I need to add specificially for you since you use both a Korg and a Roland.
I've discovered that all the major manufacturers (Yamaha, Korg, Roland, Kurtzweil, etc) do not implement the patch numbers the same way.
Korg starts their patch numbers with 000 but Roland starts theirs with 001
so you need to keep that in mind when sending the CC to the keyboards for the proper patch number.
The Midi Patch Changer solution by Genovation that's referred to in the thread only accepts patch numbers 1-128 but my Korgs have patch numbers 000-127 so in order to select the proper patch on the Korg, I have to send patch number 001 in order to get patch number 000 on the keyboard.
If you don't want try my solution but continue with yours...what you might be experiencing is the midi commands being issued to quickly for the 'receiving' keyboard to accept it..which may be why you're not getting the proper patch number.
The Midi Patch Changer by Genovation issued the commands so quickly in my case, Genovation had to insert a 100ms delay in between each one. When they did that, the proper patch numbers were selected.
Genovations product is still in BETA and not generally available through a retailer. However you can obtain it directly from Genovation.
I just finished programming and testing it and it works like a charm. Of course it still needs some refinement but it does work and I'm very happy with it.
Feel free to ask any questions.
Ed