fix random transaction bug