fixed canvas clear issue