fixed bugs window works