Some minor fixes due to the index change

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>