Changes to exception handler