modified along the changes of Chrome's WebGL implementation
fix some typo