I think the second argument should be IS_CONNECTED, otherwise the compare will always be true.