Fixed equals method for TId. Fixed transaction query bugs.