Fix prompt running in tty