Fixed a bug in case of chunking with MultiResourceItemWriter