Fix of issue #720
Issue #717
Revert "Issue #717"

This reverts commit 285183a70a2c54c32b3247f1983b0b8b676cf578.
Merge pull request #737 from olga-jane/Protsenko_v1

Exception on closing pipe form