Fixes bad captureException function