Fixed many bugs with the new webgl engine.