fixed array index error in result.id in items routes