Middleware Path fixes