Added sleep for GLWidget