fix for type error when no tags exist