fixed bug for ==. Still need testing.