Fixed off by one erro