Fix closing the channel after commit