bugfix in new linkfix function