Fix to work on big-endian