Clean up.
fix for multi window environment(SHA: d8c4ea8).