fix bug in update statement: primary key is not always url
add null check in uselink collector