window debug bug fixed