Modified equals check