Fixed master datastructure updates after removing an application; and a typo.