Small tweaks to middleware
0.0.2