fix target/source link function