clear(canvas) called instead of clearFun<-noexist