fixes bug when tags are empty; closes #260