updated support for multiple canvases