Stupid off-by-one error