Index fields fixes

Fixes #348 
Fixes #341