fix window overflow issue