fixed a bug, where playback never finished on some midi files