Fix custom hack in validate plugin