Fix middleware and route mount pathing.