Fixed canvas clear bug