fixed a bug caused by capital letter in sql