Fix clearCanvas() bug