It looks ok.
Maybe you can reproduce the problem with a small example that you can post?

Cheers,
_