fixed error in window script