diff --git a/src/stream_interface.c b/src/stream_interface.c
index 4442b22..21e9d08 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -387,12 +387,10 @@
 		 */
 
 		if (cs && cs->data_cb == &si_conn_cb) {
-			struct stream *strm = cs_strm(cs);
-
 			ret = make_proxy_line(trash.area, trash.size,
 					      objt_server(conn->target),
 					      cs_conn(si_opposite(cs_si(cs))->cs),
-					      strm);
+					      cs_strm(cs));
 		}
 		else {
 			/* The target server expects a LOCAL line to be sent first. Retrieving
@@ -595,7 +593,7 @@
  */
 static int si_cs_process(struct conn_stream *cs)
 {
-	struct connection *conn = cs_conn(cs);
+	struct connection *conn = __cs_conn(cs);
 	struct stream_interface *si = cs_si(cs);
 	struct channel *ic = si_ic(si);
 	struct channel *oc = si_oc(si);
@@ -683,14 +681,12 @@
  */
 int si_cs_send(struct conn_stream *cs)
 {
-	struct connection *conn = cs_conn(cs);
+	struct connection *conn = __cs_conn(cs);
 	struct stream_interface *si = cs_si(cs);
 	struct channel *oc = si_oc(si);
 	int ret;
 	int did_send = 0;
 
-	BUG_ON(!conn);
-
 	if (conn->flags & CO_FL_ERROR || cs->flags & (CS_FL_ERROR|CS_FL_ERR_PENDING)) {
 		/* We're probably there because the tasklet was woken up,
 		 * but process_stream() ran before, detected there were an
@@ -998,12 +994,12 @@
 	if (cs_appctx(si_f->cs) &&
 	    ((si_rx_endp_ready(si_f) && !si_rx_blocked(si_f)) ||
 	     (si_tx_endp_ready(si_f) && !si_tx_blocked(si_f))))
-		appctx_wakeup(cs_appctx(si_f->cs));
+		appctx_wakeup(__cs_appctx(si_f->cs));
 
 	if (cs_appctx(si_b->cs) &&
 	    ((si_rx_endp_ready(si_b) && !si_rx_blocked(si_b)) ||
 	     (si_tx_endp_ready(si_b) && !si_tx_blocked(si_b))))
-		appctx_wakeup(cs_appctx(si_b->cs));
+		appctx_wakeup(__cs_appctx(si_b->cs));
 }
 
 /*
@@ -1251,15 +1247,13 @@
  */
 int si_cs_recv(struct conn_stream *cs)
 {
-	struct connection *conn = cs_conn(cs);
+	struct connection *conn = __cs_conn(cs);
 	struct stream_interface *si = cs_si(cs);
 	struct channel *ic = si_ic(si);
 	int ret, max, cur_read = 0;
 	int read_poll = MAX_READ_POLL_LOOPS;
 	int flags = 0;
 
-	BUG_ON(!conn);
-
 	/* If not established yet, do nothing. */
 	if (si->state != SI_ST_EST)
 		return 0;
@@ -1638,6 +1632,8 @@
 {
 	struct channel *ic = si_ic(si);
 
+	BUG_ON(cs_appctx(si->cs));
+
 	/* If the applet wants to write and the channel is closed, it's a
 	 * broken pipe and it must be reported.
 	 */
@@ -1661,7 +1657,7 @@
 	 */
 	if ((si_rx_endp_ready(si) && !si_rx_blocked(si)) ||
 	    (si_tx_endp_ready(si) && !si_tx_blocked(si)))
-		appctx_wakeup(cs_appctx(si->cs));
+		appctx_wakeup(__cs_appctx(si->cs));
 }
 
 /*
@@ -1676,6 +1672,8 @@
 {
 	struct channel *ic = si_ic(si);
 
+	BUG_ON(cs_appctx(si->cs));
+
 	si_rx_shut_blk(si);
 	if (ic->flags & CF_SHUTR)
 		return;
@@ -1710,6 +1708,8 @@
 	struct channel *ic = si_ic(si);
 	struct channel *oc = si_oc(si);
 
+	BUG_ON(cs_appctx(si->cs));
+
 	oc->flags &= ~CF_SHUTW_NOW;
 	if (oc->flags & CF_SHUTW)
 		return;
@@ -1723,7 +1723,7 @@
 	}
 
 	/* on shutw we always wake the applet up */
-	appctx_wakeup(cs_appctx(si->cs));
+	appctx_wakeup(__cs_appctx(si->cs));
 
 	switch (si->state) {
 	case SI_ST_RDY:
@@ -1761,13 +1761,15 @@
 {
 	struct channel *ic = si_ic(si);
 
+	BUG_ON(cs_appctx(si->cs));
+
 	DPRINTF(stderr, "%s: si=%p, si->state=%d ic->flags=%08x oc->flags=%08x\n",
 		__FUNCTION__,
 		si, si->state, ic->flags, si_oc(si)->flags);
 
 	if (!ic->pipe) {
 		/* (re)start reading */
-		appctx_wakeup(cs_appctx(si->cs));
+		appctx_wakeup(__cs_appctx(si->cs));
 	}
 }
 
@@ -1776,6 +1778,8 @@
 {
 	struct channel *oc = si_oc(si);
 
+	BUG_ON(cs_appctx(si->cs));
+
 	DPRINTF(stderr, "%s: si=%p, si->state=%d ic->flags=%08x oc->flags=%08x\n",
 		__FUNCTION__,
 		si, si->state, si_ic(si)->flags, oc->flags);
@@ -1793,7 +1797,7 @@
 
 	if (!channel_is_empty(oc)) {
 		/* (re)start sending */
-		appctx_wakeup(cs_appctx(si->cs));
+		appctx_wakeup(__cs_appctx(si->cs));
 	}
 }
 
