fixed "query error" when  update a link