Fix: use correct index