Updated the order of events to update the inTransaction property first
then to reset the connection autocommit option to true.