fix canvas problem