Avoid a nil index crash