fix a bug so the path is updated correction in the terminal title