SQL injection vulnerabilities fixed
Syntax bugfix