fix path encoding on preview