Hack to fix change in how dir detection is handled on server