bug came from: ptr sometimes is bytecount, sometimes is wordcount