more fixes for endian portability.