Set event not working properly for short messages...

And the generated midi can't be played as well. FML.