Clearing up exit hooks