Fix terrible endianity problem