Added support for canvases with multiple layers