fix case where id array > 1