Improves default parameters for middleware