fix remove link from gateway with product flags in link record