Fix potential bug accessing xml tag