fix issue #10 manage multi-instances