Small bug fixes.
diff --git a/src/libframe/frbox.c b/src/libframe/frbox.c
index beb37c1..eddb4fb 100644
--- a/src/libframe/frbox.c
+++ b/src/libframe/frbox.c
@@ -116,7 +116,7 @@
 chopbox(Frame *f, Frbox *b, int n)	/* drop first n chars; no allocation done */
 {
 	char *p;
-	
+
 	if(b->nrune<0 || b->nrune<n)
 		drawerror(f->display, "chopbox");
 	p = (char*)runeindex(b->ptr, n);
diff --git a/src/libthread/channel.c b/src/libthread/channel.c
index d0fff4a..48fe78c 100644
--- a/src/libthread/channel.c
+++ b/src/libthread/channel.c
@@ -201,8 +201,8 @@
 	}else{
 		altexec(a, s);	/* unlocks chanlock, does splx */
 	}
-	t->chan = Channone;
-_threadnalt++;
+	if(t)
+		t->chan = Channone;
 	return a - alts;
 }