Fixed implementation of Eq trait