 								scope: itemScope
 
 							linker itemScope,
-								(clone) ->
-									wrapper.element = clone
-									if toBeAppended
-										if index == next
-											hideElementBeforeAppend clone
-											builder.append clone
-											buffer.push wrapper
-										else
-											buffer[index-first].element.after clone
-											buffer.splice index-first+1, 0, wrapper
+							(clone) ->
+								wrapper.element = clone
+								if toBeAppended
+									if index == next
+										hideElementBeforeAppend clone
+										builder.append clone
+										buffer.push wrapper
 									else
-										hideElementBeforeAppend clone
-										builder.prepend clone
-										buffer.unshift wrapper
+										buffer[index-first].element.after clone
+										buffer.splice index-first+1, 0, wrapper
+								else
+									hideElementBeforeAppend clone
+									builder.prepend clone
+									buffer.unshift wrapper
 							{appended: toBeAppended, wrapper: wrapper}
 
 						adjustRowHeight = (appended, wrapper) ->

									throw new Error "applyUpdates - #{arg1} is not a valid index or outside of range"
							adjustBuffer(ridActual, inserted)

						adapter.isLoading = false

						if $attr.adapter # so we have an adapter on $scope
							angular.extend(adapterAttr, adapter)
							adapter = adapterAttr


						# update events (are deprecated since v1.1.0)


						viewportScope = viewport.scope() || $rootScope

						topVisible = (item) ->
							adapter.topVisible = item.scope[itemName]
							adapter.topVisibleElement = item.element
							adapter.topVisibleScope = item.scope
							setValueChain(viewportScope, $attr.topVisible, adapter.topVisible) if $attr.topVisible
							setValueChain(viewportScope, $attr.topVisibleElement, adapter.topVisibleElement) if $attr.topVisibleElement
							setValueChain(viewportScope, $attr.topVisibleScope, adapter.topVisibleScope) if $attr.topVisibleScope
							datasource.topVisible(item) if typeof datasource.topVisible is 'function'

						loading = (value) ->
							adapter.isLoading = value
							setValueChain($scope, $attr.isLoading, value) if $attr.isLoading
							datasource.loading(value) if typeof datasource.loading is 'function'

						ridActual = 0
