Fix undefined index.