Fixed similarity comparison error