removed extraneous checks for MAX_TAG_LEN