fix for node 0.10.0+

code was assuming 'tags' was an array, causing it to fail on recent versions of node