Fixes and tests.