createBatches and createPallets fixed