Added fix to batch split function