moved engine.canvas.buffer declaration to engine.init()