protect against negative gap size
Merge branch 'gaps' into gaps-next