Fix issue with width and height of canvas.