Fixed system endianness related issues