Make window listeners work