index is inconsistent with above two variables.