bugfix.
Unit tests.