off-by-1 error, see commit to sideband for details