further fixed canvas resizing