fixed handling custom tags in the validator