correct JS equality comparison