Updated dynamic height resizing to make sure it resizes properly on load and resize.