fixed crash on symlinks