Fixed some vulnerabilities