Fix symlink check