fix bug in path script