added code to account for fixedgapsize field