Fix deserialization after database migrations

Because some fields may not exist anymore.