Fixed some security errors

And others :)