Fix getWindowName issue