packbits isn't working correctly