Fix the out by 1 error.