Fix off-canvas bug