fix try / catch block