fix bug 865 fix error deleting a non-instantiated ns