   $scope.profiles = ProfilesFactory.profiles
   return null
 
-.controller 'SingleProfileCtrl', ($scope, $stateParams, ProfilesFactory, LocationService) ->
+.controller 'SingleProfileCtrl', ($scope, $stateParams, ProfilesFactory, LocationService, ProfileService) ->
   $scope.profile = ProfilesFactory.getProfile (parseInt $stateParams.profileId)
 
   LocationService.getLocations().success (data) ->
     $scope.locations = data
-    if LocationService.currentLocation?
-      $scope.profile.location = LocationService.currentLocation
+    if ProfileService.currentLocation?
+      $scope.profile.location = ProfileService.currentLocation
 
     $scope.location = LocationService.getLocation $scope.locations, $scope.profile.location
     LocationService.currentLocation = $scope?.location?.locationId
 
   update = (newLocation) ->
     if newLocation?
-      LocationService.currentLocation = undefined
+      ProfileService.currentLocation = undefined
+      LocationService.currentLocation = newLocation
       $scope.profile.location = newLocation
       $scope.location = LocationService.getLocation $scope.locations, $scope.profile.location
 
-  $scope.$watch (() -> LocationService.currentLocation), update
+  $scope.$watch (() -> ProfileService.currentLocation), update
 
   return null

      filtered[0]
  }

.service 'LocationService', ($http, filterFilter) ->
  locationPromise = undefined
  this.getLocations = () ->

.controller 'AppCtrl', () ->
  null

.controller 'LocationsCtrl', ($scope, LocationService, ProfileService) ->
  LocationService.getLocations().success (data) ->
    $scope.locations = data

  this.current = LocationService.currentLocation
  $scope.$watch (() => this.current), (newVal) ->
    ProfileService.currentLocation = newVal

  null

