fixing a bug with PROMT_COMMAND on tty