fixed a bug for id