Simplified exit on close