Improve Exit Handling