fixed a small bug in the canvas renderer