Fixes for MIDI import

Fixes of several MIDI import issues, mostly UI.