fix missing exception handling