bug fix for singleton