Fixes bugs in try/catch