fixed overlay (box overlapping when resized) bug