Fixed bug that man terminal not exit when user press 'q'.