clean and fix

initial size of the canvas is sometimes wrong