Fix canvas resizing