Fixes problem with NoSuchDirectoryException