Fixed error there string parameters were used after the function call had ended.

Sometimes I got garbage data in my sensor and/or raw callbacks, this change seems to have fixed that problem. At least for me.