Namespace is added only if is not already present

To avoid having twice or more the same namespace. A check is added to check if it is already present.