Fix error in try catch