 			freeWidthSpace = 0
 
 	if not autoHeight
-		freeHeightSpace = (effectItem._height - rowSpacing * lastRow - topPadding - bottomPadding) - gridHeight
+		freeHeightSpace = effectItem._height - rowSpacing * lastRow - topPadding - bottomPadding - gridHeight
 		if freeHeightSpace > 0 and rowsFillsSum > 0
 			unusedFills = getCleanArray unusedFills, lastRow+1
 			length = lastRow+1

exports.DATA =
	pending: false
	updatePending: false
	disableFill: true
	gridType: 0
	gridUpdateLoops: 0
	autoWidth: true

	visibleChildren = getArray visibleChildren, children.length

	# get last column and last row
	i = lastColumn = 0
	lastRow = -1
	for child, childIndex in children
		# check visibility
		if not child._visible or (child._layout and not child._layout._enabled)
