Fix bugs in smoke testing discovery