Cast `chunksize` to an int64. Candidate fixes for #223 and #204