fix initial path problem in the script