fixed an issue where the gl-rendering would stop when device goes into sleep