Fix NullPointerException when deleting a channel.