Patch to use the ctx hierarchy