Fixed dispose of OpenGL resources and some errors