Fixed bug when using equals operations