Python3 migration: fixing data restore.