fixed bug if no programs or variables exist