Change equality check to stop warnings

Change equality check to stop warnings