fix the kx_index