Fixed the chdir config code