Changed poping after true path is captured