Typo fix
Added bounds checking for single query
Merge branch 'master' of https://github.com/j-dasilva/cms