Fixed window duplication bug