fix two bugs: syncdata generation and tag linking