send right number of parameters to function
Merge pull request #491 from dlobo/MiscFixes

send right number of parameters to function