add support to autoDimensions and better support to very long content