Added support for activity instances.