fix for rearrangements in the blockchain