Fix undefined index type