fix error condition