fix for error catch