Fixes for MIDI import

-- MIDI tests were passed ---