avoid double-assigning the same window number