Fix pipe stack overflow (#187)