resetting terminal on exit