Fix issue #40. Correct tests.