Bug 363735 - Profile page broken
diff --git a/bundles/org.eclipse.orion.client.users.ui/web/orion/profile/profile.js b/bundles/org.eclipse.orion.client.users.ui/web/orion/profile/profile.js
index 5cf0c83..ca9aee0 100644
--- a/bundles/org.eclipse.orion.client.users.ui/web/orion/profile/profile.js
+++ b/bundles/org.eclipse.orion.client.users.ui/web/orion/profile/profile.js
@@ -67,13 +67,13 @@
 			this.usersService = this.registry.getService("orion.core.user");
 			
 			if(this.usersService !== null){
-				usersService.addEventListener("requiredPluginsChanged", function(pluginsList){
+				this.usersService.addEventListener("requiredPluginsChanged", function(pluginsList){
 					dojo.hitch(userProfile, userProfile.drawPlugins(pluginsList.plugins));
 				});
-				usersService.addEventListener("userInfoChanged", function(jsonData){
+				this.usersService.addEventListener("userInfoChanged", function(jsonData){
 					dojo.hitch(userProfile,	userProfile.populateData(jsonData));
 				});
-				usersService.addEventListener("userDeleted", function(jsonData){
+				this.usersService.addEventListener("userDeleted", function(jsonData){
 					window.location.replace("/");
 				});
 				dojo.hitch(userProfile, function(){this.addInputListener();})();
@@ -165,10 +165,9 @@
 					console.error("Could not deploy plugin " + pluginsList[i].Url);
 					continue;
 				}
-				dojo.hitch(this, function(div){plugin.then(function(pluginService){
-						pluginService.getDivContent().then(function(content) {
-							dojo.hitch(userProfile, userProfile.draw(content, div));
-						});
+				dojo.hitch(this, function(div){
+					plugin.getDivContent().then(function(content) {
+						dojo.hitch(userProfile, userProfile.draw(content, div));
 					});
 				})(pluginDiv);
 			}