fix canvas error