Clean up exception handling