Trying to fix some SQL injection issues