fixed the bug around switching window and multiple ryu appearing