fix issue with params and multiple middleware in the same path