add connectAttrib and fix CHECK_GL_ERROR