Fix program exist logic