Off by 1 error corrected