Fix a bug to fail restoring data