trim space around tags

i found out the problem for the issue #44 was the spacing after the , causing the duplicate.
I am submitting a pull request to trim space around tags. 

Hope this helps