Fix setting default directory error