Fix interface and fix error message