Fixed a off by one bug in the last commit