diff --git a/cmux.go b/cmux.go
index <HASH>..<HASH> 100644
--- a/cmux.go
+++ b/cmux.go
@@ -115,7 +115,8 @@ type cMux struct {
 
 func matchersToMatchWriters(matchers []Matcher) []MatchWriter {
 	mws := make([]MatchWriter, 0, len(matchers))
-	for _, m := range matchers {
+	for _, _m := range matchers {
+		m := _m
 		mws = append(mws, func(w io.Writer, r io.Reader) bool {
 			return m(r)
 		})
Fix bug matchers are ignored except last one