Fix symlink generation code