fixed off by one bug introduced by previous commit
Merge remote-tracking branch 'origin/gaps' into gaps-next