improved the bugs of expending the canvas