Added several security protection.