fixed issues caused by switching to ids.