Some fixes and security provisions.