Exception handling fix.