first pass at fixing canvas bug