Fixed doing endian magic on negative numbers