Fixed some annoying security issues. Do not try this at home.