Possible window bug fix