avoid error when non-window