fixed reading problem with big-endian encoding!!!!!!