Fixed layout collapse bug