Add fix

Check for classes instead of using booleans.