changed debug dump to use unsigned for printf