Could you post an executable code snippet (with random inputs, assuming they recreate the issue) so that we could try to reproduce it, please?
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier