fix boundary marshalInt16

original author: Marcin Jurczuk (@mrspock)