Fixes Document API compliance.