diff --git a/modules/ns_maxemail.cpp b/modules/ns_maxemail.cpp
index cbe74fd..bf803de 100644
--- a/modules/ns_maxemail.cpp
+++ b/modules/ns_maxemail.cpp
@@ -57,7 +57,9 @@ class NSMaxEmail : public Module
 
 	EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override
 	{
-		if (command->name == "nickserv/register")
+		if (source.IsOper())
+			return EVENT_CONTINUE;
+		else if (command->name == "nickserv/register")
 		{
 			if (this->CheckLimitReached(source, params.size() > 1 ? params[1] : ""))
 				return EVENT_STOP;
@@ -67,7 +69,18 @@ class NSMaxEmail : public Module
 			if (this->CheckLimitReached(source, params.size() > 0 ? params[0] : ""))
 				return EVENT_STOP;
 		}
+		else if (command->name =="nickserv/ungroup")
+		{
+			NickCore *nc = NULL;
+			if (params.size() > 0)
+				if (NickAlias *na = NickAlias::Find(params[0]))
+					nc = na->nc;
+			else
+				nc = source.GetAccount();
 
+			if (nc && this->CheckLimitReached(source, nc->email))
+				return EVENT_STOP;
+		}
 		return EVENT_CONTINUE;
 	}
 };
