Fix exception reporting