fix bug because mysql varchar comparison is case insensitive