Fixed the ~ selector - it was selecting in the wrong direction.