Fixes plug_midi (needs cleaning)