Fix tests
Generate unique primary key for replays.