fix mix of indexes in wallet file