Fix/test for index overrun