more fixes to chunking