fixed singleton bug