I have done what you have suggested and it seems to work fine and no more errors appear in my simulation. Thank you sir!