Added support for singleton objects.