properly cleanup selector in tests