fixed bug in directory-history