fixed equality bug