Fixed an error where no terminal was found.