Added activate and deactivate to windows instead of recreating it