fixing the other off-by-one errors… copypasta!!