fix singleton bug