Fixed a small typo in the chunk.apply function.