fixing an off-by-one error

which for some reason hasn't caused any damage, but should get fixed
anyhow
Merge pull request #827 from Jojo-Schmitz/plugins

fixing an off-by-one error