Fixed a small bug in the window manager