More cleanup in exception handling