Fix problem in parseTags function