Fixed and improved some tests.