bugfix if window is 1/4 in half, it will be staying in the same half