fixed issues related to PWD not matching -start-dir argument