Symlink failing on encode

fix #3371