fixed broken reference; added endian check