Some changes to make inner content with max-height work properly