fix bug and add CheckTag