Bug fix with indices on getSubGrid