Fix context tree