Fixing bug in tissue gapfilling