fixed bad try catch