fix some program existence checking