Without some more information it is impossible to guess at the problem.
What is the result you are getting vs. the expected result?
you say "it doesn't work as expected in this instance" but do not offer any explanation of the expected result.
in addition to more details, it would also help to have a link where we could see the problem.