fix try/catch blocks