Clean up window switching