fix conditional pipe