fixed error on try/except