- Added activity reference management for fragments to avoid nulls when temporarily detached.