Bug 838005 - Added names to anonymous function and activityInProgress flag