fix beanFactory destroy singleton bug