Fixed invalid index.