fixed sql case sensitivity bug