fix error when config hasn't been set. handle empty last element of new tags array