Improved security rules