Fix flag handling

In the previous code, if @boneIndex() returns 0, then @xyz() is called.
This is not expected for me.
Set window.model for development use
Convert UTF16LE bytes to String