fixed terminal emulator crash