fix chunking bug identified by @jakebolewski
Merge pull request #179 from stevengj/chunkbug

fix chunking bug