fix error caught by unit test