Made operator== more efficient