fix error when there is no error