Fix off by 1000 error