Fixed wrong matching in .has()