Replace c.name with c.window, because sometime c.name is empty string.