fix for crashes screwing up the terminal