Fixing bugs with test framework.