Continuing fixes

Fixing indexing problem