fix error handling issues