set autocommit properly