Exception on closing pipe form

Exception on closing pipe form #720