Modified the removal of canvas.