fixed problem in tty_clear due to refined syntax check