Improve handling of extra parameters