add: better support for generics
fix: StackOverflowError for singleton scope