Fixed undefined index.