fix a bug for named instance