apparently two different off-by-one errors