fixed a big bug in the midi

it works better now