fix bug with equals