fixed program bug