correct cwd for preview rendering