fix symlink detection