Fixing a memory corruption - and changing the way tX_midiin works. Not