Corrected the issues in batch saving