window bug fix