fix shell middleware to work without beaker