fix Invalid condition