added handling of right/lower borders when 'limitedToWrapper'