fix replaceCanvas code...