Make linkPath smarter