Fixes directory detection lookup.