I have now opened a new question as the problem is now off the original topic.
Thanks for your help on this @andresrcs