Middleware groundlayer and glue fix
Merged