Fix inverted parameters

This commit relates to issue #8, and fixes exactly the same kind of bug.