Fixed some SQL Injection vulnerabilities