handling case sensitive tags

this is my attempt to handle case sensitive tags. this problem probably won't show up if you're using autocomplete field, but in my case, I let my client type the tags by themselves, and the problem occur when they type tags differently (one is capitalize, the other in small case, but same word)