Fix some very bad security issues