Index errors repared