Fixed off-by-one error regarding items printed