Some fixes to take care of the null ref issue that would randomly throw a null ref when loading the list of apps.