Fix for bug in batchMap (closes #40)