Some uppdates beacuse of the length and width properties of canvas.