Fixed bug with Window object.