isDir fix