Fixed bugs in source updating and link updating.