Major fix to support multiple canvases