Try to fix hang of program.