fixed marking directory in tree as selected