fix sync for $scope