do not emit COMMIT/ROLLBACK twice

Fixes #8.