Fix some off-by-ones