avoid bug in chunks.py