fix link issues for many targets