fix error index bug

Signed-off-by: yh <yhchinabest@gmail.com>