be more restrictive about invalid hashes