Minor tweaks to getTags method.