cleaning up tty output