fixed bug in tcanvas