Fix bug in save_canvas