Bugfix: Sometimes reading 32 bits would read the past the end of the stream
Bugfix: Fixed writeBinary when writing negative values