Hack to fix "The path is not of legal form" error