Refine windows size