fixed the offset and ordering in printhex