Fixes for indexing models using arrays