Fix get-layout() math