fix tag compare bug