change back to maxlegnth attribure for counter