Fixed window problems

fixed problem of window overlaping that is focuing