It would be best to isolate the problem using a minimal compilable example.