Middleware: fix import of mst