fix ensure frame visibility