Fix bug where chunkdata is not saved (issue #144).