Array index typo

It seems that +1 is missing in condition.