Avoids crash when an old screen is being replaced by a new one (cherry picked from commit f05e251991c0f89c9f275acc4d6c29a4fc856913)
Avoids crash when an old screen is being replaced by a new one (cherry picked from commit f05e251991c0f89c9f275acc4d6c29a4fc856913)