Fixed issues with security rules.