fixes to try/except