Better resetting of terminal

Signed-off-by: Zeklandia <awood5659@gmail.com>