Fix an issue when there's maximized windows