adjust scaffold handling
more gap handling