Fixing fillGaps