Fixed bug when resizing before the canvas loaded:

 - the canvas is only created after the xml is downloaded, thus resizing beforehand tried to resize the non-existent canvas