Bug Fixes in WindowHandler