fix program text extraction bug