fixed a bug with ids