Implemented more robust handling of path conditions.