Patch to broken isValid impl