fix bugs about Window view