Improve Exit routine