Fixed isDirectory