a bit more stable
fix clear canvas