fix issue with channel closing