fix some gl-render bugs