fix window access