fix multiple crashes in chunk