fixer a crash when validateLayout got called after teardown.