fix unicode encoding error with tag output, closes #1