Perhaps providing some code
could be helpful. That way we can better understand what the issues are. Minimally the function signatures you have now, and the signature of common function you are calling inside them, as well as the definitions of any types being passes. Of course, the full code of before and after would be ideal, if you can share.