Corrected off by one error. Fixes #23