Fix overlapping contexts issue