fix for modelind being empty array