fix error catch