bugfix: use index kf only if they are valid
segment colors