Made changes with the directory control to work on windows machines