fix try-catch-block