Sysex-related fixes

Hi,

Here is the pull request for the sysex changes I did.