Fixed a bug with a datatype mismatch when outputting the tag.

Fixes #10