Solved the bug of terminal