diff --git a/contrib/mobile/drawContext.cpp b/contrib/mobile/drawContext.cpp
index 549501b404e5639ab116d6ae02bbf4def865b0ab..89778b75ddea759d3a1ab36d88fba816b246e9bf 100644
--- a/contrib/mobile/drawContext.cpp
+++ b/contrib/mobile/drawContext.cpp
@@ -62,6 +62,7 @@ void drawContext::load(std::string filename)
 
   // restore default options
   GmshRestoreDefaultOptions();
+  GmshSetOption("General", "Terminal", 1.0);
 
   // open the file with Gmsh
   GmshOpenProject(filename);
@@ -626,6 +627,7 @@ void drawContext::drawView()
   checkGlError("Initialize position");
 
   glEnable(GL_DEPTH_TEST);
+
   drawMesh();
   checkGlError("Draw mesh");
   drawGeom();
diff --git a/contrib/mobile/drawString.cpp b/contrib/mobile/drawString.cpp
index 0efdd6342240499fe10b782e4298977b906b8ebe..82169715ebb5e74e977734be96cb4ba401327139 100644
--- a/contrib/mobile/drawString.cpp
+++ b/contrib/mobile/drawString.cpp
@@ -10,6 +10,7 @@
 
 drawString::drawString(std::string text, int size, float color[4])
 {
+  _map = 0;
   _size = size;
   if(color == NULL)
     setColor(0.0f, 0.0f, 0.0f, 1.0f);
diff --git a/contrib/mobile/iOS/Onelab/ModelViewController.mm b/contrib/mobile/iOS/Onelab/ModelViewController.mm
index ebc06dc97ea1e403cd61980f11692244fc6033c2..982406ed8da8c785bfbed599c82fcb05485bb96f 100644
--- a/contrib/mobile/iOS/Onelab/ModelViewController.mm
+++ b/contrib/mobile/iOS/Onelab/ModelViewController.mm
@@ -381,10 +381,11 @@ void getBitmap(void *self, const char *text, int textsize, unsigned char **map,
   i=2;
   while(i<*height) i*=2;
   *height = i;
+
   UIGraphicsBeginImageContextWithOptions(CGSizeMake(*width, *height), NO, 0.0);
   [lbl.layer renderInContext:UIGraphicsGetCurrentContext()];
   UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
-
+  UIGraphicsEndImageContext();
   CGImageRef bitmap = [img CGImage];
   CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
   unsigned char *rawData = (unsigned char*) calloc(*height * *width * 4, sizeof(unsigned char));