Modified API to use header attributes restoring function directly