better windows end session cleanup