Fix the blockchain-wipes-every-startup bug, updated version.