fix for negative ids in adapter