api: fix call-time pass-by-reference error
Merge pull request #875 from fabrixxm/fix_api

api: fix call-time pass-by-reference error