Some cleanups

Moving "Hair fix" to ruleset.
Fixing name of function that test for invaild cache.