fix error struct