Handle missing window gracefully