Fixed logic so that pipe model is consistent with decid model