small fix for chdir