fixed canvas bug