Fixed problem in Window class