fixed a bug for tag