fix index by for cached models