Fixed problem with window