fix try-catch