Condition is not working?