small bug in transaction query