Merge "Fixing NPE when there is no running activity."