Fixed a bug for judging if one state is satisfied a goal.