Fix empty tag array

Add logic should the tag array be empty