Fixed typo in tests
Fixed parameter handling in APIFunctions