Fix check_contents in validator