Fixed isDirectory compile bug