bug fix for linkpath