Fixed determining if window is enabled