Yeah it seems that was the problem in my case as well, and making that C++ function fixed the problem. Thank you!