Corrected eq implementation