Fixing error catch