Fix dynamic height issue