fix for optional parameters in named routes