Fixed typo and change sql query

Fixed typo and change sql query for better search results
Merge pull request #2 from roose/master

Fixed typo and change sql query