Patch to cover all the above implementation details.