fix sector index check