made change to unpublish streams so close is executed properly