Fixed incorrect algorithm.
Bumped to version 0.2.2.