Fixed bug for wndow property