o fixed CheckForProgram Function