fix error by returning ids