fixes bug with saving canvas size