Fix inner size calculation, fix dragging