debugging weird stuff going on with only the second call to the midi file working