Without seeing more of your code, I dont think we can help much more.
Could you please create an MRE for use?