Fix roll history IP storage.
Fix some issues in the upstream code.