Fixed bad conditional statements

This fixes a cache clearing issue.