fix define singleton bug