Fix a bug with growing canvas