Update index when removing item (fixes #22)