Fix equal? and add test