fixed window overlapping bug