fix error case