Fixing issue #28, an off-by-one error.