fix missing parameter declaration + definition ordering