Fixed pipe writing issue.