diff --git a/settings/js/apps.js b/settings/js/apps.js
index 7849e1b757367da0d71e60211f774458c410686a..d1de3d727c02431231a25054f4fb10ccb761ff86 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -86,11 +86,12 @@ OC.Settings.Apps = OC.Settings.Apps || {
 		}), {
 			type:'GET',
 			success: function (apps) {
-				var appList = _.map(_.indexBy(apps.apps, 'id'), function(app) {
+				var appListWithIndex = _.indexBy(apps.apps, 'id');
+				OC.Settings.Apps.State.apps = appListWithIndex;
+				var appList = _.map(appListWithIndex, function(app) {
 					// default values for missing fields
 					return _.extend({level: 0}, app);
 				});
-				OC.Settings.Apps.State.apps = appList;
 				var source   = $("#app-template").html();
 				var template = Handlebars.compile(source);
 
diff --git a/settings/tests/js/appsSpec.js b/settings/tests/js/appsSpec.js
index 60e3692def4f86ff4af36c59514366ecc95dc7af..907d441ff4d4e452153ad05f30b51cae10639822 100644
--- a/settings/tests/js/appsSpec.js
+++ b/settings/tests/js/appsSpec.js
@@ -159,6 +159,32 @@ describe('OC.Settings.Apps tests', function() {
 			var results = getResultsFromDom();
 			expect(results.length).toEqual(5);
 			expect(results).toEqual(['alpha', 'delta', 'zork', 'foo', 'nolevel']);
+			expect(OC.Settings.Apps.State.apps).toEqual({
+				'foo': {
+					id: 'foo',
+					name: 'Foo app',
+					level: 0
+				},
+				'alpha': {
+					id: 'alpha',
+					name: 'Alpha app',
+					level: 300
+				},
+				'nolevel': {
+					id: 'nolevel',
+					name: 'No level'
+				},
+				'zork': {
+					id: 'zork',
+					name: 'Some famous adventure game',
+					level: 200
+				},
+				'delta': {
+					id: 'delta',
+					name: 'Mathematical symbol',
+					level: 200
+				}
+			});
 		});
 	});