Fixed some security issues