fix setting the index for pockets in history (must be the first element from the wallet index).