fix typo from startId to endId