fixed bug with the database deleting random ids from the pool