content range has precendence; fix bug to detect max length