fixed a logic error in sanitycheckhelper