Fixed try catch statement