fix: StackOverflowError for singleton scope