nested $scope issue