fix transaction bug