Fixed a bug.
More tests.