Fix nil layout bug