Fix context path extraction