Fix swapped arguments in function call

Fixes issue #45
Merge pull request #50 from lbeltrame/fix-swapped-arguments

Fix swapped arguments in function call