fix #2600
diff --git a/gym/envs/toy_text/frozen_lake.py b/gym/envs/toy_text/frozen_lake.py
index 90ee6a16231..6c23d759498 100644
--- a/gym/envs/toy_text/frozen_lake.py
+++ b/gym/envs/toy_text/frozen_lake.py
@@ -230,10 +230,10 @@ def reset(
 
     def render(self, mode="human"):
         desc = self.desc.tolist()
-        if mode == "ansi":
-            return self._render_text(desc)
-        else:
+        if mode == "human":
             return self._render_gui(desc)
+        else:
+            return self._render_text(desc)
 
     def _render_gui(self, desc):
         if self.window_surface is None:

fix #2600