Hi Daniel, thanks again. I modified the code and now it's working as I need. Do you think this could be useful for anybody else? If so I can show/send you the code to verify it's ok and then ask for a pull request.

Thanks again!

Diego