fixed bugs in pileupChunks