add proper support for stat on links, also for #89