avoid invoking batch commit on unused handler at exit