Null reference fix for tags.