Improved equal operator