Fixed device equality check.