fix drawFun error