Fixed uninitialised global canvasSize