changed order of connect middleware for bracket