Fix some very dumb off-by-one errors