Hiding counter feilds with conditions is not working