fixed the problem where directory list doesn't refresh