Fixes the index