It will not fix anything regarding the mapping, but you might not be mapping it correctly.
Given the variety of Organ controllers, we have created a pretty complicated MIDI mapping system, so it's better to use it.
I don't know how Mainstage works, but i'm sure it lets MIDI CC through, so as long as the B-5 receives the CCs, you can use the MIDI panel and skip the Mainstage stuff.