Fix a crash that can occur when receiving only one tag.

In that case the tagArray is a string and can be added directly.