fixed race condition
Merge branch 'master' of https://github.com/cevian/go-stream