some cleanup in exception handling