FIX: local window when terminating