BUG fixes ambiguous column sql error in link tracking