Add check to see if tags are ended