fix endian and scaling issue affected by some files