fixed bug in matR_batch_dl.r