Fix swapped arguments in function call

Fixes issue #45.