Fixed an error in the case of no tags, confirmed compatibility with WP 3.6