Fix: calculate button position