Changed the implementation of batch statement so that commit will never be called if any errors are encountered