Fix exception throwing.