Fixed some more SQL injection vulnerabilities