Added support for auto_commit environment