search for selector in each loop iteration fix