some chdir fix