Merge "Fix crash in ManagedApplicationService." into nyc-dev