Last commit introduced an off by one regression, fix it