fixed int bug and remove deleted id from self.ids