Bug fix.
Adding more tests.