make index warning an assertion to prevent wrong samples