Better ID handling