fix transaction close