Fixed exception throwing.