Fixed a last minute off by one error