fix for "too many arguments" #2434

Fix for #2434 issue. This have been extracted from my original "bulky" pull-request.
Sorry that I didn't do it right in a first place