Tweak gap method to make tests pass