fix 'autochdir' issue