fixed resizing of canvas