fix try catch