connect middleware that causes chaos