Fix interface, errors, and test case.