fix bug: need to stay in the directory started in