Changing compare to != as per review comment