bug fix window object